package com.thinkgem.jeesite.common.web.webservice;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PagingInfo {
	private Integer requestPage;
	private Integer totalCount;
	private Integer pageSize;
	private Integer curPageNum;
	private Integer totalPage;

	public static PagingInfo EMPTY = new PagingInfo();
	
	public Integer getRequestPage() {
		return requestPage;
	}

	public Integer getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getCurPageNum() {
		return curPageNum;
	}

	public void setCurPageNum(Integer curPageNum) {
		this.curPageNum = curPageNum;
	}

	public Integer getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(Integer totalPage) {
		this.totalPage = totalPage;
	}

	public void setRequestPage(Integer requestPage) {
		this.curPageNum = requestPage;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof PagingInfo)) {
			return false;
		}
		PagingInfo info = (PagingInfo) obj;
		if (totalCount != info.getTotalCount()) {
			return false;
		}
		if (pageSize != info.getPageSize()) {
			return false;
		}
		if (curPageNum != info.getCurPageNum()) {
			return false;
		}
		if (totalPage != info.getTotalPage()) {
			return false;
		}
		return true;
	}

}
